<h2><?php echo Yii::t('views', 'Managing service'); ?></h2>

<?php
$this->widget('application.widgets.SubMenu', array ());
?>

<table class="dataGrid">
  <thead>
  <tr>
    <th><?php echo $sort->link('id'); ?></th>
    <th><?php echo $sort->link('label'); ?></th>
	<th width="70">Actions</th>
  </tr>
  </thead>
  <tbody>
<?php foreach($models as $n=>$model): ?>
  <tr class="<?php echo $n%2?'even':'odd';?>">
    <td><?php echo CHtml::encode($model->id); ?></td>
    <td><?php echo CHtml::encode($model->label); ?></td>
    <td width="70" align="center">
      <?php
echo CHtml::link(CHtml::image(Yii::app()->request->baseUrl . '/images/edit.png', Yii::t('userinfo', 'Update')),array('update','id'=>$model->id));
echo CHtml::linkButton(CHtml::image(Yii::app()->request->baseUrl . '/images/del.png', Yii::t('userinfo', 'Delete')), array (
      	'submit' => '',
      	'params' => array (
      		'command' => 'delete',
      		'id' => $model->id
      	),
      	'confirm' => Yii::t('views', "Are you sure to delete #{service}?", array (
      		'{service}' => $model->label
      	))
      ));
      echo CHtml::link(CHtml::image(Yii::app()->request->baseUrl . '/images/add.png', Yii::t('submenu', 'New user')),array('create'));
      ?>
	</td>
  </tr>
<?php endforeach; ?>
  </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages)); ?>